home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_13_05 / gilhooly / winjes.h < prev    next >
C/C++ Source or Header  |  1995-04-09  |  1KB  |  46 lines

  1. #include <windows.h>
  2. #ifndef  RC_INVOKED
  3. #include <winsock.h>
  4. #include <memory.h>
  5. #endif
  6. #include "resource.h"
  7. #define VERSION         (LPSTR)"WinJES 1.0"
  8. #define WM_SOCKET       WM_USER+50
  9. #define MAXTEXT         256
  10. #define MAXMSG          30
  11. #define MAXNAME         80
  12. #define MAXBUFFER       128
  13. #define MAXHOST         65
  14. #define MYPORT          10000
  15. #define IDM_SEND        WM_USER+100
  16. #define IDM_ABOUT       WM_USER+110
  17. #pragma pack(1)
  18. // data structures
  19. typedef struct _Message
  20.         {
  21.             char szCommand[MAXBUFFER];
  22.             char szHostName[MAXHOST];
  23.         } Message;            
  24. // globals
  25. #ifndef GLOBALS
  26. #define ALLOC extern
  27. #else
  28. #define ALLOC
  29. #endif
  30. ALLOC   Message InMessage;
  31. ALLOC   Message OutMessage;
  32. ALLOC   char    szMsg[MAXMSG];
  33. ALLOC   HANDLE  hInst;              // global instance handle
  34. ALLOC   int     sock;               // socket
  35.  
  36. // prototypes
  37. #ifndef RC_INVOKED
  38. int  PASCAL     WinMain(HINSTANCE, HINSTANCE, LPSTR, int);
  39. BOOL            InitApplication(HINSTANCE);
  40. BOOL            InitInstance(HINSTANCE, int);
  41. long CALLBACK   MainWndProc(HWND, UINT, WPARAM, LPARAM);
  42. BOOL CALLBACK   HostProc(HWND, UINT, WPARAM, LPARAM);
  43. BOOL CALLBACK   AboutProc(HWND, UINT, WPARAM, LPARAM);
  44. #endif
  45.  
  46.